raar.process.sensor
Class RARegionSensor

java.lang.Object
  extended byraar.process.RAProcess
      extended byraar.process.sensor.RASensor
          extended byraar.process.sensor.RARegionSensor
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RACameraSensor, RARegionSensor_Pie

public abstract class RARegionSensor
extends RASensor
implements java.io.Serializable

A sensor with a certain region of perception (usually a cone within which the sensor sees something).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class raar.process.sensor.RASensor
emulateRegisterNames, emulateRegisterObjects, output, outputName
 
Fields inherited from class raar.process.RAProcess
hasRun, inregister, outregister, register, sourceCode, statement
 
Constructor Summary
RARegionSensor(java.lang.String outputName, RAAgent agent)
          Construct the sensor.
 
Method Summary
abstract  java.awt.Shape getRegion(double currentX, double currentY, double currentA)
          Give the sensor region, given that the sensor's origin is at the coördinate (x,y) and the rotation of the agent on which the sensor is placed is a..
 void run()
          Run the sensor.
 
Methods inherited from class raar.process.sensor.RASensor
acceptsInput, dumpRegisters, execute, explain, get, getAgent, getColor, getDataType, getInputNames, getInputObjects, getOutputNames, getOutputObjects, getSensorValue, isSpecial, set, setAgent, setOutput, setSourceCode, suppliesOutput, toString
 
Methods inherited from class raar.process.RAProcess
clone, getProcessName, getSourceCode, reset, setProcessName
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RARegionSensor

public RARegionSensor(java.lang.String outputName,
                      RAAgent agent)
Construct the sensor.

Method Detail

run

public final void run()
               throws RAException
Run the sensor.

Specified by:
run in class RASensor
Throws:
RAException

getRegion

public abstract java.awt.Shape getRegion(double currentX,
                                         double currentY,
                                         double currentA)
Give the sensor region, given that the sensor's origin is at the coördinate (x,y) and the rotation of the agent on which the sensor is placed is a..